Release 10.1A: OpenEdge Data Management:
SQL Reference
Unsubscripted array references
When there is a reference to an unsubscripted Progress 4GL array column, OpenEdge SQL performs these operations:
- Extracts each element from the Progress 4GL array.
- Converts the element to a
DT_VARCHARdata type.- Passes the element to the
PRO_ARR_ESCAPEfunction for the addition of any necessary escape characters.- Concatenates the result to a composite with the separator character ( ; ) between this element and the next element.
This results in dual data types for array fields. The fetch type is
ExamplesTPE_DT_NVARCHARfor the unsubscripted references. The underlying Progress 4GL data type is the native type.The first example assumes a character array named
ARRAYCHARcontaining three elements in a row in the customer table where thecust_numcolumn is equal to 88, and with values:
ARRAYCHAR[ 1 ] = 'aa'
ARRAYCHAR[ 2 ] = 'bb'
ARRAYCHAR[ 3 ] = 'cc'The
ARRAYCHARexample returns the value 'aa;bb;cc':
To retrieve an individual element from an array with any escape characters removed, use the
PRO_ELEMENTandPRO_ARR_DESCAPEfunctions. For example,ARRAYTYPE[ 2 ]contains the value 'aa;bb'. ThePRO_ELEMENTfunction in theARRAYTYPEexample returns 'aa~;bb' andPRO_ARR_DESCAPE('aa~;bb') removes the escape character (~), returning the element value 'aa;bb':
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |